/**
 * This file is part of the dspace-poltman project http://www.poltman.com.
 *
 * This is free software; you can redistribute it and/or modify it under
 * the terms of DuraSpace DSpace license detailed in the LICENSE and NOTICE 
 * files at the root of the source tree and available online at
 * http://www.dspace.org/license/
 * 
 */
package com.poltman.dscentral.fragment.dspace.workflow;

import java.util.List;

import org.apache.log4j.Logger;
import org.zkoss.zkplus.spring.SpringUtil;

import com.poltman.dscentral.db.entity.pm.LanguagesEntity;
import com.poltman.dscentral.db.service.pm.LanguagesService;
import com.poltman.dscentral.core.vm.menu.MenuNode;

/**
 * 
 * @author z.ciok@poltman.com
 *
 */
public class WorkflowMenu {
		
		private static Logger log = Logger.getLogger(WorkflowMenu.class);

		
		public WorkflowMenu() throws Exception {
			LanguagesService  languagesService = (LanguagesService) SpringUtil.getBean("languagesService");
			if (languagesService == null) {
				log.info("WorkflowMenu languagesService == null");
			} else {
				log.info("WorkflowMenu languagesService != null");
				List<LanguagesEntity> languages = languagesService.findAll();
			}
			
			node = new MenuNode("Workflow", null);
				MenuNode payable1 = new MenuNode("workflow1", null);
				node.addChild(payable1);
				MenuNode payable2 = new MenuNode("workflow2", null);
				node.addChild(payable2);
		}

		private MenuNode node = null;

		public MenuNode getNode() {
			return node;
		}
	}
